package com.wpzf.zxhc.controller;

import com.wpzf.common.core.web.domain.AjaxResult;
import com.wpzf.common.log.annotation.Log;
import com.wpzf.common.log.enums.BusinessType;
import com.wpzf.zxhc.domain.*;
import com.wpzf.zxhc.service.WpzfTbhcjgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/wpzfresult")
public class WpzfTbhcjgController
{

    @Autowired
    WpzfTbhcjgService wpzfTbhcjgService;


    //获取核查结果
    @Log(title = "获取核查结果", businessType = BusinessType.OTHER)
    @RequestMapping(value = "/gethcjg", method = RequestMethod.POST)
    AjaxResult gethcjg(@RequestBody Map<String,Object> parms)
    {
        try
        {
            List<WpCjTbhcjg2023DTO>  wpCjTbhcjg2023DTOS = wpzfTbhcjgService.querytbhcjgBytbbh(parms);
            return AjaxResult.success("获取成功", wpCjTbhcjg2023DTOS);
        }
        catch (Exception ex)
        {
            return AjaxResult.error("获取失败", ex.toString());
        }
    }

    @Log(title ="获取合法-核查结果",businessType = BusinessType.OTHER)
    //获取合法信息
    @RequestMapping(value = "/getHftgzmwj", method = RequestMethod.POST)
    AjaxResult getHftgzmwj(@RequestBody Map<String,Object> parms)
    {
        try
        {
            List<WpCjTbhcjgHftgzmwj2023DTO> wpCjTbhcjgHftgzmwj2023DTOS = wpzfTbhcjgService.getHftgzmwj(parms);
            return AjaxResult.success("获取成功", wpCjTbhcjgHftgzmwj2023DTOS);
        }
        catch (Exception ex)
        {
            return AjaxResult.error("获取失败", ex.toString());
        }
    }

    @Log(title ="获取合法-核查结果",businessType = BusinessType.OTHER)
    //获取合法信息
    @RequestMapping(value = "/getHftgzmwj11", method = RequestMethod.POST)
    AjaxResult getHftgzmwj11(@RequestBody Map<String,Object> parms)
    {
        try
        {
            List<WpCjTbhcjgHftgzmwj2023DTO> wpCjTbhcjgHftgzmwj2023DTOS = wpzfTbhcjgService.getHftgzmwj(parms);
            return AjaxResult.success("获取成功", wpCjTbhcjgHftgzmwj2023DTOS);
        }
        catch (Exception ex)
        {
            return AjaxResult.error("获取失败", ex.toString());
        }
    }
    @Log(title ="获取违法-证明文件",businessType = BusinessType.OTHER)
    //获取违法证明文件
    @RequestMapping(value = "/getWftgzmwj", method = RequestMethod.POST)
    AjaxResult getWftgzmwj(@RequestBody Map<String,Object> parms)
    {
        try
        {
            List<WpCjTbhcjgWftgzmwj2023DTO> wpCjTbhcjgWftgzmwj2023DTO = wpzfTbhcjgService.getWftgzmwj(parms);
            return AjaxResult.success("获取成功", wpCjTbhcjgWftgzmwj2023DTO);
        }
        catch (Exception ex)
        {
            return AjaxResult.error("获取失败", ex.toString());
        }
    }

    @Log(title ="获取违法-批准文号",businessType = BusinessType.OTHER)
    //获取违法批准文号
    @RequestMapping(value = "/getWfpzwh", method = RequestMethod.POST)
    AjaxResult getWfpzwh(@RequestBody Map<String,Object> parms)
    {
        try
        {
            List<WpCjTbhcjgWfpzwh2023DTO> wpCjTbhcjgWfpzwh2023DTO = wpzfTbhcjgService.getWfpzwh(parms);
            return AjaxResult.success("获取成功", wpCjTbhcjgWfpzwh2023DTO);
        }
        catch (Exception ex)
        {
            return AjaxResult.error("获取失败", ex.toString());
        }
    }

    @Log(title ="获取违法-证明文件",businessType = BusinessType.OTHER)
    //获取违法证明文件
    @RequestMapping(value = "/getWftgzmwj11", method = RequestMethod.POST)
    AjaxResult getWftgzmwj11(@RequestBody Map<String,Object> parms)
    {
        try
        {
            List<WpCjTbhcjgWftgzmwj2023DTO> wpCjTbhcjgWftgzmwj2023DTO = wpzfTbhcjgService.getWftgzmwj(parms);
            return AjaxResult.success("获取成功", wpCjTbhcjgWftgzmwj2023DTO);
        }
        catch (Exception ex)
        {
            return AjaxResult.error("获取失败", ex.toString());
        }
    }

    @Log(title ="获取违法-批准文号",businessType = BusinessType.OTHER)
    //获取违法批准文号
    @RequestMapping(value = "/getWfpzwh11", method = RequestMethod.POST)
    AjaxResult getWfpzwh11(@RequestBody Map<String,Object> parms)
    {
        try
        {
            List<WpCjTbhcjgWfpzwh2023DTO> wpCjTbhcjgWfpzwh2023DTO = wpzfTbhcjgService.getWfpzwh(parms);
            return AjaxResult.success("获取成功", wpCjTbhcjgWfpzwh2023DTO);
        }
        catch (Exception ex)
        {
            return AjaxResult.error("获取失败", ex.toString());
        }
    }
    @Log(title ="获取其他-批准文号",businessType = BusinessType.OTHER)
    //获取其他批准文号
    @RequestMapping(value = "/getQtpzwh", method = RequestMethod.POST)
    AjaxResult getQtpzwh(@RequestBody Map<String,Object> parms) {
        try
        {
            List<WpCjTbhcjgQtpzwh2023DTO> rest = wpzfTbhcjgService.getQtpzwh(parms);
            return AjaxResult.success("获取成功", rest);
        }
        catch (Exception ex)
        {
            return AjaxResult.error("获取失败", ex.toString());
        }
    }

    @Log(title ="获取其他-是否占用耕地",businessType = BusinessType.OTHER)
    //获取其他是否占用耕地
    @RequestMapping(value = "/getQtsfzygd", method = RequestMethod.POST)
    AjaxResult getQtsfzygd(@RequestBody Map<String,Object> parms) {
        try
        {
            List<WpCjTbhcjgQtsfzygd2023DTO> rest = wpzfTbhcjgService.getQtsfzygd(parms);
            return AjaxResult.success("获取成功", rest);
        }
        catch (Exception ex)
        {
            return AjaxResult.error("获取失败", ex.toString());
        }
    }

    //获取其他提供先行用地手续
    @Log(title ="获取其他-提供先行用地手续",businessType = BusinessType.OTHER)
    @RequestMapping(value = "/getQtsftgxxydss", method = RequestMethod.POST)
    AjaxResult  getQtsftgxxydss(@RequestBody Map<String,Object> parms) {
        try
        {
            List<WpCjTbhcjgQtsftgxxydss2023DTO> rest = wpzfTbhcjgService.getQtsftgxxydss(parms);
            return AjaxResult.success("获取成功", rest);
        }
        catch (Exception ex)
        {
            return AjaxResult.error("获取失败", ex.toString());
        }
    }

    @Log(title ="获取其他-批准文号",businessType = BusinessType.OTHER)
    //获取其他批准文号
    @RequestMapping(value = "/getQtpzwh11", method = RequestMethod.POST)
    AjaxResult getQtpzwh11(@RequestBody Map<String,Object> parms) {
        try
        {
            List<WpCjTbhcjgQtpzwh2023DTO> rest = wpzfTbhcjgService.getQtpzwh(parms);
            return AjaxResult.success("获取成功", rest);
        }
        catch (Exception ex)
        {
            return AjaxResult.error("获取失败", ex.toString());
        }
    }

    @Log(title ="获取其他-是否占用耕地",businessType = BusinessType.OTHER)
    //获取其他是否占用耕地
    @RequestMapping(value = "/getQtsfzygd11", method = RequestMethod.POST)
    AjaxResult getQtsfzygd11(@RequestBody Map<String,Object> parms) {
        try
        {
            List<WpCjTbhcjgQtsfzygd2023DTO> rest = wpzfTbhcjgService.getQtsfzygd(parms);
            return AjaxResult.success("获取成功", rest);
        }
        catch (Exception ex)
        {
            return AjaxResult.error("获取失败", ex.toString());
        }
    }

    //获取其他提供先行用地手续
    @Log(title ="获取其他-提供先行用地手续",businessType = BusinessType.OTHER)
    @RequestMapping(value = "/getQtsftgxxydss11", method = RequestMethod.POST)
    AjaxResult  getQtsftgxxydss11(@RequestBody Map<String,Object> parms) {
        try
        {
            List<WpCjTbhcjgQtsftgxxydss2023DTO> rest = wpzfTbhcjgService.getQtsftgxxydss(parms);
            return AjaxResult.success("获取成功", rest);
        }
        catch (Exception ex)
        {
            return AjaxResult.error("获取失败", ex.toString());
        }
    }


}
